---
id: 5dc24614f86c76b9248c6ebd
title: Hatua ya 10
challengeType: 0
dashedName: step-10
---

# --description--

You can link to another page with the anchor (`a`) element.

Here is an example linking to `https://www.freecodecamp.org`:

```html
<a href="https://www.freecodecamp.org"></a>
```

Ongeza kipengele cha nanga baada ya aya inayounganishwa na `https://freecatphotoapp.com`. Kwa hatua hii, kiungo hakitaonekana katika onyesho la kukagua.

# --hints--

Kipengele chako cha nanga (`a`) kinapaswa kuwa na tagi ya ufunguzi. Tagi za ufunguzi zina sintaksia hii: `<elementName>`.

```js
assert(document.querySelector('a'));
```

Kipengele chako cha nanga (`a`) kinapaswa kuwa na tagi ya kufunga. Tagi za kufunga zina `/` mara baada ya herufi ya `<`.

```js
assert(code.match(/<\/a\>/));
```

Kipengele chako cha nanga (`a`) kinapaswa kuwa chini ya kipengele cha `p`. Unazo katika mpangilio mbaya.

```js
const collection = [...document.querySelectorAll('a, p')].map(
  (node) => node.nodeName
);
assert(collection.indexOf('P') < collection.indexOf('A'));
```

Kipengele chako cha nanga (`a`) hakina sifa ya `href`. Hakikisha kuwa kuna nafasi baada ya jina la tagi inayofungua na/au kuna nafasi kabla ya majina yote ya sifa.

```js
assert(document.querySelector('a').hasAttribute('href'));
```

Kipengele chako cha nanga (`a`) kinapaswa kuunganishwa na `https://freecatphotoapp.com`. Aidha umesahau URL au umeandika makosa.

```js
assert(
  document.querySelector('a').getAttribute('href') ===
    'https://freecatphotoapp.com'
);
```

Ingawa umeweka sifa ya kipengele cha nanga ('a') cha `href` kwa kiungo sahihi, inashauriwa kuzunguka thamani ya sifa kila wakati kwa alama za nukuu.

```js
assert(
  !/\<a\s+href\s*=\s*https:\/\/www.freecodecamp.org\/cat-photos/.test(code)
);
```

# --seed--

## --seed-contents--

```html
<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
--fcc-editable-region--
      <p>See more cat photos in our gallery.</p>

--fcc-editable-region--
      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
    </main>
  </body>
</html>
```

